<?php

class bigstereo_scraper extends BlogScraper
{
    function __construct()
    {
        parent::__construct('bigstereo');
    }
    
    function getPostLinks()
    {
        $posts = $this->xpath->query("//h4//a");  
        return $posts;
    }
}

class bigstereo_post_scraper extends PostScraper
{
    
    function getTitle()
    {
        $title = $this->xpath->query("//h4//a")->item(0)->nodeValue;
        echo $title;
        return $title;
    }
    
    function getLink()
    {
        return $this->xpath->query("//h4//a")->item(0)->getAttribute('href');
    }
    
    function prepareTrack($track)
    {   
        $track_parts = explode("–", $track['name']);
        
        if (count($track_parts) == 2)
        {
            $track['name'] = $track_parts[0].' - '.$track_parts[1];
            $track['artist'] = $this->removeQuotes(trim($track_parts[0]));
            $track['song'] = $this->removeQuotes(trim($track_parts[1]));
        }
        
        return $track;
    }
         
        
    
    function getDate()
    {
        $date_node = $this->xpath->query("//div[@class='post']//small")->item(0)->nodeValue; 
        $date_node = explode('::', $date_node);
        
        if (strlen($date_node[0]) > 4) 
        {
            $date = date('Y-m-d', strtotime($date_node[0]));
            return $date;
        }        
    }
    
    
}

?>